#include <rtthread.h>
#include "E53_SC1.h"
#include "drv_lcd.h"

E53_SC1_Data data;

int main(void)
{
    E53_SC1_Init();
    while(1)
    {
        E53_SC1_Read_Data(&data);

        lcd_show_string(5, 100,  24, "LUX:%d lux    ", data.Lux);
        rt_kprintf("Lux data:%d lux\r\n", data.Lux);
        
        if (data.Lux < 50) {
            E53_SC1_Light_Set(ON);
        } else {
            E53_SC1_Light_Set(OFF);
        }
        rt_thread_mdelay(2000);
    }
}
